using System;
using System.Collections.Generic;
using System.Text;
namespace FrameWorkSystem.BusinessLayer
{
	public class Sys_Users: BusinessObjectBase
	{        
		#region InnerClass
		public enum Sys_UsersFields
		{
			User_Name,
			Passwords,
			Full_Name,
			Group_ID,
			Is_Mon,
			Is_Tue,
			Is_Wed,
			Is_Thu,
			Is_Fri,
			Is_Sad,
			Is_Sun,
			Start_Date,
			End_Date,
			IsEdit,
			IsDelete,
			IsNew
		}
		#endregion

		#region Data Members
            
            string _realpasswords;

			string _user_Name;
			string _passwords;
			string _full_Name;
			string _group_ID;
			bool _is_Mon;
			bool _is_Tue;
			bool _is_Wed;
			bool _is_Thu;
			bool _is_Fri;
			bool _is_Sad;
			bool _is_Sun;
			DateTime _start_Date;
			DateTime _end_Date;
			bool _isEdit;
			bool _isDelete;
			bool _IsNew;

		#endregion

		#region Properties

		public string  User_Name
		{
			 get 
             { 
                 return _user_Name; 
             }
			 set
			 {
                 if (value == "")
                 {

                     _isvalid = false;
                     _errorMsg = "Tên User để trống"; return;
                 }
                 _user_Name = value;                
			 }
		}
        
		public string  Passwords
		{
			 get { return _passwords; }
			 set
			 {
                 _passwords = value;
                 _realpasswords = AppCryptor.Cryptor.Decrypt(value);
			 }
		}

        public string Realpasswords
        {
            get { return _realpasswords; }
            set 
            { 
                _realpasswords = value;
                _passwords = AppCryptor.Cryptor.Encrypt(value);
            }
        }

		public string  Full_Name
		{
			 get { return _full_Name; }
			 set
			 {
				 if (_full_Name != value)
				 {
					_full_Name = value;
					 //PropertyHasChanged("Full_Name");
				 }
			 }
		}

		public string  Group_ID
		{
			 get { return _group_ID; }
			 set
			 {
				 if (_group_ID != value)
				 {
					_group_ID = value;
					 //PropertyHasChanged("Group_ID");
				 }
			 }
		}

		public bool  Is_Mon
		{
			 get { return _is_Mon; }
			 set
			 {
				 if (_is_Mon != value)
				 {
					_is_Mon = value;
					 //PropertyHasChanged("Is_Mon");
				 }
			 }
		}

		public bool  Is_Tue
		{
			 get { return _is_Tue; }
			 set
			 {
				 if (_is_Tue != value)
				 {
					_is_Tue = value;
					 //PropertyHasChanged("Is_Tue");
				 }
			 }
		}

		public bool  Is_Wed
		{
			 get { return _is_Wed; }
			 set
			 {
				 if (_is_Wed != value)
				 {
					_is_Wed = value;
					 //PropertyHasChanged("Is_Wed");
				 }
			 }
		}

		public bool  Is_Thu
		{
			 get { return _is_Thu; }
			 set
			 {
				 if (_is_Thu != value)
				 {
					_is_Thu = value;
					 //PropertyHasChanged("Is_Thu");
				 }
			 }
		}

		public bool  Is_Fri
		{
			 get { return _is_Fri; }
			 set
			 {
				 if (_is_Fri != value)
				 {
					_is_Fri = value;
					 //PropertyHasChanged("Is_Fri");
				 }
			 }
		}

		public bool  Is_Sad
		{
			 get { return _is_Sad; }
			 set
			 {
				 if (_is_Sad != value)
				 {
					_is_Sad = value;
					 //PropertyHasChanged("Is_Sad");
				 }
			 }
		}

		public bool  Is_Sun
		{
			 get { return _is_Sun; }
			 set
			 {
				 if (_is_Sun != value)
				 {
					_is_Sun = value;
					 //PropertyHasChanged("Is_Sun");
				 }
			 }
		}

		public DateTime  Start_Date
		{
			 get { return _start_Date; }
			 set
			 {
				 if (_start_Date != value)
				 {
					_start_Date = value;
					 //PropertyHasChanged("Start_Date");
				 }
			 }
		}

		public DateTime  End_Date
		{
			 get { return _end_Date; }
			 set
			 {
				 if (_end_Date != value)
				 {
					_end_Date = value;
					 //PropertyHasChanged("End_Date");
				 }
			 }
		}

		public bool  IsEdit
		{
			 get { return _isEdit; }
			 set
			 {
				 if (_isEdit != value)
				 {
					_isEdit = value;
					 //PropertyHasChanged("IsEdit");
				 }
			 }
		}

		public bool  IsDelete
		{
			 get { return _isDelete; }
			 set
			 {
				 if (_isDelete != value)
				 {
					_isDelete = value;
					 //PropertyHasChanged("IsDelete");
				 }
			 }
		}

		public bool  IsNew
		{
			 get { return _IsNew; }
			 set
			 {
				 if (_IsNew != value)
				 {
					_IsNew = value;
					 //PropertyHasChanged("IsNew");
				 }
			 }
		}

		#endregion

	}
}
